<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="root"></div>
<script src="../../javascript/react.development.js"></script>
<script src="../../javascript/react-dom.development.js"></script>
<script src="../../javascript/babel.min.js"></script>
<script type="text/babel">

    class Person extends React.Component {
        constructor(props, context) {
            super(props, context)
        }
        render() {
            const {name, age, sex} = this.props
            return (
                <div className="app">
                    <ul>
                        <li>姓名是：{name}</li>
                        <li>年龄是：{age}</li>
                        <li>性别是：{sex}</li>
                    </ul>
                </div>
            );
        }
    }

    // ReactDOM.render(<Person name="陶品奇" age="22" sex="男"></Person>, document.querySelector("#root")) 一个一个的传递props
    const data = {name: "马云", age: 50, sex: "男"}
    ReactDOM.render(<Person {...data}></Person>, document.querySelector("#root")) // 批量的传递props属性
</script>
</body>
</html>